// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 

import java.io.PrintStream;
import javax.microedition.lcdui.*;
import pica.core.g;
import pica.ui.*;

public final class b extends b
    implements Runnable
{

    public b(h h1, String s1, int i1, int j1, int k1, int l1, int i2)
    {
        super(h1, s1);
        p = Font.getFont(0, 0, 8);
        q = 0;
        super.e = i1;
        super.f = j1;
        super.g = k1;
        super.h = l1;
        u = i2;
        if(i2 == 1)
        {
            l = Image.createImage("/middle/popo.png");
            m = Image.createImage("/middle/monster.png");
            (new Thread(this)).start();
        } else
        if(i2 == 3)
        {
            k = Image.createImage("/middle/progress.png");
            m = Image.createImage("/middle/monster.png");
            n = Image.createImage("/middle/picaword.png");
            System.currentTimeMillis();
        } else
        if(i2 == 2)
        {
            m = Image.createImage("/middle/monster.png");
            n = Image.createImage("/middle/picaword.png");
        }
        return;
        JVM INSTR dup ;
        Exception exception;
        exception;
        printStackTrace();
    }

    public b(h h1, String s1, int i1, int j1, int k1, int l1, int i2, 
            boolean flag)
    {
        super(h1, s1);
        p = Font.getFont(0, 0, 8);
        q = 0;
        super.e = i1;
        super.f = j1;
        super.g = k1;
        super.h = l1;
        u = i2;
        j = flag;
        if(i2 == 2)
        {
            m = Image.createImage("/middle/monster.png");
            n = Image.createImage("/middle/picaword.png");
        }
        return;
        JVM INSTR dup ;
        Exception exception;
        exception;
        printStackTrace();
    }

    public b(h h1, String s1, int i1, int j1, int k1, int l1, int i2, 
            g g1)
    {
        super(h1, s1);
        p = Font.getFont(0, 0, 8);
        q = 0;
        super.e = i1;
        super.f = j1;
        super.g = k1;
        super.h = l1;
        u = i2;
        if(i2 == 3)
        {
            k = Image.createImage("/middle/progress.png");
            m = Image.createImage("/middle/monster.png");
            n = Image.createImage("/middle/picaword.png");
            System.currentTimeMillis();
        }
        return;
        JVM INSTR dup ;
        Exception exception;
        exception;
        printStackTrace();
    }

    public final void b(c c1)
    {
        v = c1;
    }

    protected final void a(Graphics g1)
    {
        g1.setFont(p);
        g1.setColor(0xffffff);
        g1.fillRect(super.e, super.f, super.g, super.h);
        if(u == 1)
        {
            g1.drawImage(l, super.g / 2, (super.h / 2 - l.getHeight()) + 10, 17);
            g1.drawImage(m, super.g / 2, super.h / 2 + 10, 17);
            return;
        }
        if(u == 3)
        {
            if(i != null)
            {
                g1.setColor(0);
                g1.drawString(i, (super.e + super.g) / 2, (super.f + super.h) / 2 - p.getHeight() - 47, 17);
            }
            g1.setClip((super.e + super.g) / 2 - k.getWidth(), ((super.f + super.h) / 2 - 47) + 5, k.getWidth() * 2, k.getHeight());
            g1.drawImage(k, (o + (super.e + super.g) / 2) - k.getWidth() * 2, ((super.f + super.h) / 2 - 47) + 5, 20);
            g1.setClip((super.e + super.g) / 2 - k.getWidth(), ((super.f + super.h) / 2 - 47) + 5, k.getWidth() * 2, k.getHeight());
            g1.drawImage(k, (o + (super.e + super.g) / 2) - k.getWidth(), ((super.f + super.h) / 2 - 47) + 5, 20);
            g1.setClip((super.e + super.g) / 2 - k.getWidth(), ((super.f + super.h) / 2 - 47) + 5, k.getWidth() * 2, k.getHeight());
            g1.drawImage(k, o + (super.e + super.g) / 2, ((super.f + super.h) / 2 - 47) + 5, 20);
            g1.setClip(super.e, super.f, super.g, super.h);
            g1.drawImage(n, super.g / 2, super.h / 2 - 20 - 47, 33);
            o += 3;
            if(o >= k.getWidth())
                o = 0;
            g1.setColor(0);
            if(System.currentTimeMillis() - t > 6000L)
            {
                s = f.a(r[b(r.length - 1)], super.g - 10, p);
                t = System.currentTimeMillis();
            }
            for(int i1 = 0; i1 < s.length; i1++)
                g1.drawString(s[i1], 5, ((super.f + super.h) / 2 - 47) + k.getHeight() + (i1 + 1) * (p.getHeight() + 2), 20);

            return;
        }
        if(u == 2)
        {
            g1.drawImage(m, super.g / 2, super.h / 2 - 20, 33);
            g1.drawImage(n, super.g / 2, super.h / 2 - 20 - 47, 33);
            g1.setColor(0xffc000);
            g1.fillRect(super.g / 2 - 50, (super.h / 2 - 13) + q * (p.getHeight() + 5), 100, p.getHeight() + 5);
            g1.setColor(0);
            g1.drawString("\u6211\u6709PICA\u53F7", super.g / 2, super.h / 2 - 10, 17);
            g1.drawString("\u6211\u662F\u65B0\u7528\u6237", super.g / 2, (super.h / 2 - 10) + 5 + p.getHeight(), 17);
            g1.drawString("\u4F7F\u7528\u4EE3\u7406", (super.g / 2 - 2 * p.getHeight()) + 15, (super.h / 2 - 10) + 2 * (p.getHeight() + 5), 20);
            g1.setColor(0);
            g1.drawRect(super.g / 2 - 2 * p.getHeight(), (super.h / 2 - 8) + 2 * (p.getHeight() + 5), 10, 10);
            if(j)
                g1.fillRect((super.g / 2 - 2 * p.getHeight()) + 2, (super.h / 2 - 8) + 2 * (p.getHeight() + 5) + 2, 7, 7);
        }
    }

    protected final boolean a(byte byte0, int i1)
    {
        boolean flag = false;
        switch(byte0)
        {
        case 0: // '\0'
            a(i1);
            flag = true;
            break;
        }
        return flag;
    }

    protected final boolean a(byte byte0, int i1, int j1)
    {
        if(byte0 == 0)
            return a(i1, j1);
        else
            return false;
    }

    private boolean a(int i1, int j1)
    {
        boolean flag = false;
        int k1;
        if((k1 = (j1 - (super.h / 2 - 13)) / (p.getHeight() + 5)) > 2)
            k1 = 2;
        else
        if(k1 < 0)
            k1 = 0;
        if(f.a(i1, j1, super.g / 2 - 50, (super.h / 2 - 13) + k1 * (p.getHeight() + 5), 100, p.getHeight() + 5))
        {
            q = k1;
            a();
            a(-5);
            flag = true;
        }
        return flag;
    }

    private void a()
    {
        super.b.repaint();
        super.b.serviceRepaints();
    }

    private void a(int i1)
    {
        if(u != 2)
            return;
        System.out.println("" + b(9));
        switch(i1)
        {
        case -1: 
        case 50: // '2'
            if(q == 0)
            {
                q = 2;
                return;
            } else
            {
                q--;
                return;
            }

        case -2: 
        case 56: // '8'
            if(q == 2)
            {
                q = 0;
                return;
            } else
            {
                q++;
                return;
            }

        case -5: 
        case 53: // '5'
            super.a.a(14, new Integer(q));
            break;
        }
    }

    public final void run()
    {
        a.a();
        c.a();
        d.c();
        e.a();
        pica.ui.a.a();
        c.b();
        String as[];
        r = as = (new String[] {
            "  \u6DFB\u52A0\u597D\u53CB:\u83DC\u5355->\u6DFB\u52A0\u597D\u53CB->PICA\u53F7\u3001\u5728\u7EBF\u597D\u53CB\u3001\u6761\u4EF6\u67E5\u627E", "  PICA\u7A7A\u95F4\u4E2D\u4E0A\u4F20\u7167\u7247\u53D1\u5E03\u535A\u5BA2\u5B8C\u5584\u4E2A\u4EBA\u8D44\u6599\u5C06\u6210\u500D\u589E\u52A0\u4EA4\u53CB\u673A\u4F1A!", "  \u5929\u6C14\u54A8\u8BE2\u3001\u706B\u8F66\u65F6\u523B\u3001\u5E7D\u9ED8\u77ED\u4FE1\uFF0C\u5C3D\u5728PICA\u4E50\u56ED", "  \u63091/7\u952E\u53EF\u4EE5\u4E0A/\u4E0B\u7FFB\u9875\uFF0C\u5FEB\u901F\u6D4F\u89C8\u597D\u53CB\u6216\u804A\u5929\u5BA4\u5217\u8868\uFF0C\u63093/9\u952E\u53EF\u4EE5\u5408\u5E76/\u5C55\u5F00\u6240\u6709\u5206\u7EC4\uFF01", "  \u5728PICA\u5427\u91CC\uFF0C\u53EF\u4EE5\u53D1\u5E03\u548C\u6D4F\u89C8\u81EA\u5DF1\u7684\u535A\u5BA2\uFF0C\u4E5F\u53EF\u4EE5\u6D4F\u89C8\u4ED6\u4EBA\u7684\u7CBE\u54C1\u95EA\u535A!", "  \u5728\u6211\u7684\u597D\u53CB\u754C\u9762\uFF0C\u6309*\u952E\u53EF\u4EE5\u5FEB\u901F\u8FDB\u5165\u5728\u7EBF\u72B6\u6001\u8BBE\u7F6E\u754C\u9762\uFF01", "  \u5728\u6211\u7684\u597D\u53CB\u754C\u9762\uFF0C\u6309#\u952E\u53EF\u4EE5\u5207\u6362\u6253\u5F00/\u5173\u95ED\u65B0\u4FE1\u606F\u63D0\u793A\u97F3\uFF01", "  \u70B9\u51FB\u4E00\u4E2A\u597D\u53CB\uFF0C\u5728\u5F39\u51FA\u83DC\u5355\u91CC\u9009\u201CPICA\u7A7A\u95F4\u201D\uFF0C\u53EF\u4EE5\u5FEB\u901F\u8FDB\u5165\u8BE5\u597D\u53CB\u7684\u535A\u5BA2\u7A7A\u95F4\uFF01", "  \u597D\u53CB\u5934\u50CF\u524D\u5E26\u6709\u5C0F\u661F\u661F\u56FE\u6807\uFF0C\u8868\u793A\u8BE5\u597D\u53CB\u7684\u535A\u5BA2\u7A7A\u95F4\u66F4\u65B0\u4E86\u65B0\u5185\u5BB9\uFF01"
        });
        s = f.a(r[b(r.length - 1)], super.g - 10, p);
        t = System.currentTimeMillis();
        try
        {
            Thread.sleep(3000L);
        }
        catch(InterruptedException _ex) { }
        v.b(48, null);
    }

    private static int b(int i1)
    {
        String s1;
        int j1;
        if((j1 = Integer.parseInt(s1 = (s1 = (new Long(System.currentTimeMillis())).toString()).substring(s1.length() - 1))) > i1)
            j1 -= i1;
        return j1;
    }

    public String i;
    private Image k;
    private Image l;
    private Image m;
    private Image n;
    private int o;
    private Font p;
    private int q;
    private static String r[];
    private static String s[];
    public static boolean j;
    private long t;
    private int u;
    private c v;
}
